import router from "@/router";
//路由鉴权：就是路由能不能被访问到授权设置-》全局守卫完成
import Nprogress from 'nprogress'
import 'nprogress/nprogress.css'
Nprogress.configure({showSpinner:false})
router.beforeEach((to,from,next)=>{
   //访问路由组件之前，进度条开始动
    Nprogress.start();
    document.title = `尚医通-${to.meta.title}`
    next();
});
router.afterEach((to,from)=>{
   //访问路由组件成功，进度条消失
    Nprogress.done();
})
